#ifndef GAMEMESSAGE_H
#define GAMEMESSAGE_H

#include "SocketMessage.h"

#include <memory>

class GameMessage
{
public:
	GameMessage();
	//GameMessage(int timeStamp);
	virtual ~GameMessage() {}
	virtual void Execute() = 0;
	virtual bool Read(SocketMessage* sm) = 0;
	virtual void Write(SocketMessage* sm) = 0;

	bool operator<(const GameMessage& gm) const;
	float GetTimeDiff();
	void SetTimeStamp(unsigned int ts);

protected:
	unsigned int m_timeStamp; // seconds
};

//bool operator<(const GameMessage& gm1, const GameMessage& gm2);
typedef std::shared_ptr<GameMessage> PGameMessage;

#endif //GAMEMESSAGE_H